package com.rd.student.ruanjian.class1.duhang.Week04.New;

public class HashSetDemo {
    public static void main(String[] args) {
        Student s1 = new Student("zhangsan",12);
        Student s2 = new Student("zhangsan",12);

        //如果没有重写hashCode方法，不同对象计算出的哈希值是不同的
        System.out.println(s1.hashCode());
        System.out.println(s2.hashCode());

        System.out.println("abc".hashCode());
        System.out.println("abD".hashCode());
    }
}
